using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public enum EvtID
{
    None,
    OnRoleDataUpdate,
}

public class EvtSvc : ILogic
{
    private PEMsger<EvtID> mMsg;
    public void Init()
    {
        mMsg = new PEMsger<EvtID>();
        mMsg.MsgerInit();
    }

    public void Tick()
    {
      mMsg.MsgerTick();
    }

    public void UnInit()
    {
       mMsg.MsgerUnInit();
    }
    public void AddMsgHandler(EvtID evtID, Action<object, object> cb) {
       mMsg.AddMsgHandler(evtID, cb);
    }
    public void RmvHandlerByMsgID(EvtID evtID) {
       mMsg.RmvHandlerByMsgID(evtID);
    }
    public void RmvHandlerByTarget(object target) {
        mMsg.RmvHandlerByTarget(target);
    }

    public void InvokeMsgHandler(EvtID evtID, object param1 = null, object param2 = null) {
        mMsg.InvokeMsgHandler(evtID, param1, param2);
    }
    public void InvokeMsgHandlerImmediately(EvtID evtID, object param1 = null, object param2 = null) {
       mMsg.InvokeMsgHandler(evtID, param1, param2);
    }
    
}
